home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / flight-of-the-museum.swf / scripts / engine / levelData / Level_01.as next >
Encoding:
Text File  |  2011-10-17  |  1.6 KB  |  59 lines

  1. package engine.levelData
  2. {
  3.    import copy.CopyBank;
  4.    import engine.WorldScene;
  5.    import engine.dynamicObjects.*;
  6.    
  7.    public class Level_01 extends LevelData
  8.    {
  9.        
  10.       
  11.       public function Level_01()
  12.       {
  13.          super();
  14.          _goalParameters = new Array();
  15.       }
  16.       
  17.       override public function buildLevel() : *
  18.       {
  19.          var tablet:* = undefined;
  20.          var gTabs:Number = NaN;
  21.          var i:* = undefined;
  22.          var fuelIcon:* = undefined;
  23.          var goalObj:Object = null;
  24.          var missionObj:Object = null;
  25.          super.buildLevel();
  26.          gTabs = 5;
  27.          for(i = 0; i < gTabs; i++)
  28.          {
  29.             tablet = new TabletPiece();
  30.             tablet.x = 800 + i * 300;
  31.             tablet.y = 400 + Math.random() * 150;
  32.             WorldScene.Instance.GameplayObjects.push(tablet);
  33.          }
  34.          fuelIcon = new FuelIcon();
  35.          fuelIcon.x = 3000;
  36.          fuelIcon.y = 500;
  37.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  38.          _missionDescription = CopyBank.Instance.MissionDesc_Tablets;
  39.          goalObj = {
  40.             "Type":"Tablet",
  41.             "Count":gTabs
  42.          };
  43.          _goalParameters.push(goalObj);
  44.          missionObj = {
  45.             "Description":_missionDescription,
  46.             "BoundsX":_missionBoundsX,
  47.             "BoundsHint":_missionBoundsHint,
  48.             "GoalParamaters":_goalParameters,
  49.             "PrimaryGoalType":"Tablets",
  50.             "StartLoc":{
  51.                "x":50,
  52.                "y":500
  53.             }
  54.          };
  55.          WorldScene.Instance.setMissionDetails(missionObj);
  56.       }
  57.    }
  58. }
  59.